#!/usr/bin/env python
# coding: utf-8
from matplotlib.pyplot import *

fin2=open('time_err_n3.dat')
todo2=fin2.read().split('\n')
xs=[float(x.split()[0]) for x in todo2 if x]
ys2=[float(x.split()[1]) for x in todo2 if x]
yerr2=[float(x.split()[2]) for x in todo2 if x]
title("Tiempo de ejecución de algoritmo cubico de $cw$")
xlabel("Tamano de entrada")
ylabel("Tiempo de ejecucion")
errorbar(xs,ys2,yerr2,marker='_',color='b',ls='None',label="$algoritmo cubico$")
plot(xs,[x**3*.00000024 for x in xs],color='r',label=r"$c \times n^3$")
legend(loc="upper left")
#text(1,.6,"en promedio,\nalgoritmo_cubico/strassen="+str("%.3f"%diff))
savefig('ej3_times_n3.png',dpi=640./8)
show()
